// 2025.03.27  23:04 星期四 风 无事
// 我想 写一个 动画 的 焦点弹窗

import { create_static_focusDisplay_mana } from '.';
import { addEvent } from '../../../../global/element/Event/Func/add_remove_eventListen';
import { normalizeContainer } from '../../../../global/element/Func';
// eslint-disable-next-line no-unused-vars
import { focusDisplay_operate } from './Classes/cla_focusDisplay_operate/cla_focusDisplay_operate';

// 给 焦点弹窗 添加 自定义 弹出 消失

let win_static_focusDisplay = create_static_focusDisplay_mana('tempFocus');

const btn_id = 'tempClick';

/**
 * @type {HTMLElement}
 */
let btn_el;

function init_fd() {
  btn_el = normalizeContainer(btn_id);

  addEvent(btn_el, 'click', createNewFullScreenDom);
}

function createNewFullScreenDom() {
  let dom = win_static_focusDisplay.getOrCreate_focusDisplay_dom();

  /**
   * @type {focusDisplay_operate}
   */
  let domoperate = win_static_focusDisplay[dom.id];
  domoperate.targetEl.innerHTML =
    '<button id="tempClick_disappear">点我创建 退出全屏元素</button>';
  let cancel_el = normalizeContainer('tempClick_disappear');
  addEvent(cancel_el, 'click', domoperate.cancle.bind(domoperate));
  domoperate.display();
}
export { init_fd };
